package com.towexin.application.system.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * TODO
 * 日志表
 * @author Towexin
 * @version 1.0
 * @date 2021/4/18 9:57
 */
@Data
@TableName("t_system_log")
@NoArgsConstructor
@AllArgsConstructor
public class SystemLog implements Serializable {
    private static final long serialVersionUID = -4839733112247751824L;

    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @TableField
    private String username; //用户名

    @TableField
    private String operation; //操作

    @TableField
    private String method; //方法名

    @TableField
    private Integer type;//操作类型(0登录、1查询、2增加、3修改、4删除)

    //@TableField
    //private String params; //参数

    @TableField
    private String ip; //ip地址

    @TableField
    private String url; //请求的url

    @TableField(fill = FieldFill.INSERT, insertStrategy = FieldStrategy.NOT_NULL)
    private Date createdTime;
}
